package xhwl.hmo.mall.http.api;


import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.hmo.mall.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by admin on 2017/1/16.
 */

public class AddressListApi extends BaseApi {
    AddressListReq req;
    public AddressListApi(String memberMobile,int page){
        req=new AddressListReq(memberMobile,page);
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).getAddressList(requestBody);
    }
    public class AddressListReq {
        private String member_mobile;
        private String page_num;
        public AddressListReq(String member_mobile,int page){
            this.member_mobile= member_mobile;
            this.page_num=page+"";
        }
    }
}
